package com.bytefy.core;

public class Timer {
	private long time;

	public void start() {
		time = System.nanoTime();
	}

	public void stop() {
		time = System.nanoTime() - time;
	}
	
	public double getTime() {
		return time/1000000000d;
	}
	
	@Override
	public String toString() {
		return String.format("%.5f", getTime());
	}
}
